home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d934.lha / ToolType / Install_ToolType next >
Text File  |  1993-12-20  |  6KB  |  254 lines

  1. ; Installation script for ToolType
  2.  
  3. (set @user-level 2)
  4.  
  5. (transcript "Installing ToolType...")
  6.  
  7. (copylib
  8.         (prompt "Install ReqTools library.")
  9.         (help @copylib-help)
  10.         (source "LIBS/ReqTools.library")
  11.         (dest "libs:")
  12.         (confirm)
  13. )
  14.  
  15. ( if (= (exists "ENV:EDITOR" (noreq)) 0)
  16.     (set defed "C:ED %s")
  17.     (set defed (getenv "EDITOR"))
  18. )
  19.  
  20. (set editor
  21.         (askstring
  22.                 (prompt "What editor do you want?")
  23.                 (help @askstring-help)
  24.                 (default defed)
  25.         )
  26. )
  27.  
  28. (set env
  29.         (askbool
  30.                 (prompt "Do you want to also save the Editor config\n"
  31.                         "in an environment variable 'ToolType'?")
  32.                 (help "It's up to YOU.")
  33.                 (choices "Yes" "No")
  34.                 (default 0)              ; 0 = no
  35.         )
  36. )
  37.  
  38. (set detach
  39.         (askbool
  40.                 (prompt "Does your editor detach from the CLI?")
  41.                 (help "It's up to YOU.")
  42.                 (choices "Yes" "No")
  43.                 (default 0)              ; 0 = no
  44.         )
  45. )
  46.  
  47. (set appicon
  48.         (askbool
  49.                 (prompt "Do you want ToolType to be started\n"
  50.                         "as an App Icon?")
  51.                 (help "It's up to YOU.")
  52.                 (choices "Yes" "No")
  53.                 (default 0)              ; 0 = no
  54.         )
  55. )
  56.  
  57. (if (= appicon 1)                           ; conditional test
  58.     (
  59.         (set def_dir "SYS:WBStartup")
  60.         (set iconx
  61.                 (asknumber
  62.                         (prompt "X coordinate of AppIcon\n"
  63.                                 "'0' = float")
  64.                         (help @asknumber-help)
  65.                         (default 0)
  66.                 )
  67.         )
  68.         (set icony
  69.                 (asknumber
  70.                         (prompt "Y coordinate of AppIcon\n"
  71.                                 "'0' = float")
  72.                         (help @asknumber-help)
  73.                         (default 0)
  74.                 )
  75.         )
  76.         (set iconname
  77.                 (askstring
  78.                         (prompt "What do you want to call the AppIcon?")
  79.                         (help @askstring-help)
  80.                         (default "ToolType")
  81.                 )
  82.         )
  83.     )
  84.     (
  85.         (set def_dir "SYS:Utilities")
  86.     )
  87. )
  88.  
  89. (set sort
  90.         (askchoice
  91.                 (prompt "How do you want to handle sorting?")
  92.                 (help @askchoice-help)
  93.                 (choices "Never Sort" "Ask me every time" "Always Sort" )
  94.                 (default 1)
  95.         )
  96. )
  97.  
  98. (set comt
  99.         (askbool
  100.                 (prompt "Do you want the commented tooltypes placed\n"
  101.                         "before the non commented when sorting?")
  102.                 (help "It's up to YOU.")
  103.                 (choices "Yes" "No")
  104.                 (default 0)              ; 0 = no
  105.         )
  106. )
  107.  
  108. (set conf
  109.         (askbool
  110.                 (prompt "Do you want the confirm changes requester?")
  111.                 (help "It's up to YOU.")
  112.                 (choices "Yes" "No")
  113.                 (default 0)              ; 0 = no
  114.         )
  115. )
  116.  
  117. (tooltype
  118.         (dest "ToolType")
  119.         (settooltype "EDITOR" editor)
  120. )
  121.  
  122.  
  123. (if (= conf 1)                           ; conditional test
  124.     (tooltype
  125.             (dest "ToolType")
  126.             (settooltype "CONFIRM" "")
  127.     )
  128.     (tooltype
  129.             (dest "ToolType")
  130.             (settooltype "(CONFIRM)" "")
  131.     )
  132. )
  133.  
  134. (if (= appicon 1)
  135.     (
  136.         (tooltype
  137.                 (dest "ToolType")
  138.                 (settooltype "APPICON" "")
  139.         )
  140.         (tooltype
  141.                 (dest "ToolType")
  142.                 (settooltype "ICONX" (cat iconx))
  143.         )
  144.         (tooltype
  145.                 (dest "ToolType")
  146.                 (settooltype "ICONY" (cat icony))
  147.         )
  148.         (tooltype
  149.                 (dest "ToolType")
  150.                 (settooltype "ICONNAME" iconname)
  151.         )
  152.     )
  153.     (
  154.         (tooltype
  155.                 (dest "ToolType")
  156.                 (settooltype "(APPICON)" "")
  157.         )
  158.         (tooltype
  159.                 (dest "ToolType")
  160.                 (settooltype "(ICONX)" "")
  161.         )
  162.         (tooltype
  163.                 (dest "ToolType")
  164.                 (settooltype "(ICONY)" "")
  165.         )
  166.         (tooltype
  167.                 (dest "ToolType")
  168.                 (settooltype "(ICONNAME)" "")
  169.         )
  170.     )
  171. )
  172.  
  173. (if (= comt 1)                           ; conditional test
  174.     (tooltype
  175.             (dest "ToolType")
  176.             (settooltype "COMMENT" "")
  177.     )
  178.     (tooltype
  179.             (dest "ToolType")
  180.             (settooltype "(COMMENT)" "")
  181.     )
  182. )
  183.  
  184. (if (= env 1)                           ; conditional test
  185.    (
  186.         (textfile
  187.                 (dest "ENV:ToolType")
  188.                 (append editor)
  189.         )
  190.         (textfile
  191.                 (dest "ENVARC:ToolType")
  192.                 (append editor)
  193.         )
  194.     )
  195. )
  196.  
  197.  
  198. (if (= detach 1)                           ; conditional test
  199.     (tooltype
  200.             (dest "ToolType")
  201.             (settooltype "WAIT" "")
  202.     )
  203.     (tooltype
  204.             (dest "ToolType")
  205.             (settooltype "(WAIT)" "")
  206.     )
  207. )
  208.  
  209. (if (= sort 0)                           ; conditional test
  210.     (tooltype
  211.             (dest "ToolType")
  212.             (settooltype "SORT" "FALSE")
  213.     )
  214.     (if (= sort 2)
  215.         (tooltype
  216.                 (dest "ToolType")
  217.                 (settooltype "SORT" "TRUE")
  218.         )
  219.         (tooltype
  220.                 (dest "ToolType")
  221.                 (settooltype "SORT" "ASK")
  222.         )
  223.     )
  224. )
  225.  
  226. (tooltype
  227.         (dest "ToolType")
  228.         (settooltype "(QUIET)" "")
  229. )
  230.  
  231.  
  232. (set destdir
  233.         (askdir
  234.                 (prompt "Install ToolType where?")
  235.                 (help @askdir-help)
  236.                 (default def_dir)
  237.         )
  238. )
  239.  
  240. (copyfiles
  241.         (source "ToolType")
  242.         (infos)
  243.         (dest destdir)
  244. )
  245.  
  246. (set @default-dest destdir)
  247.  
  248. (message "\n\nIf you want to stop the copyright requester from\n"
  249.          "appearing when starting from WorkBench,\n"
  250.          " you need to uncomment the tooltype \"QUIET\"")
  251.  
  252. (exit)
  253.  
  254.